//
//  BIZBusinessPressDetailHonorCell.m
//  biz
//
//  Created by 小龙 on 2017/4/6.
//  Copyright © 2017年 jieshuibao. All rights reserved.
//

#import "BIZBusinessPressDetailHonorCell.h"
#import "HZPhotoGroup.h"
@interface BIZBusinessPressDetailHonorCell()
@property (weak, nonatomic) IBOutlet HZPhotoGroup *photoView;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *photoHeightLayout;

@end

@implementation BIZBusinessPressDetailHonorCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}


- (void)setPhotoGroupStr:(NSString *)photoGroupStr
{
    _photoGroupStr = [photoGroupStr copy];

    if (![photoGroupStr isBlank]) {
        NSMutableArray *images = [@[] mutableCopy];
        NSArray *arr = [photoGroupStr componentsSeparatedByString:@","];
        [arr enumerateObjectsUsingBlock:^(NSString *obj, NSUInteger idx, BOOL * _Nonnull stop) {
            [images addObject:[NSString stringWithFormat:@"%@/%@/%@", kMainBaseUrl, kShowImage, obj]];
        }];
        
        self.photoView.photoItemArray = images;
        self.photoHeightLayout.constant = self.photoView.height;

    } else {
        self.photoView.photoItemArray = @[];
        [self.photoView setHeight:0];
        self.photoHeightLayout.constant = 0;
      
    }

}

@end
